#include "EquationSolver.h"
#include <iostream>
#include <cmath>
//#define M_PI 3.14159265358979323846


double Function :: operator()(double _x)
{
    return (1.0/_x-pow(2, _x));
}
double Function :: diff(double _x)
{
    return 0;//二分法不需要用到导数，返回0即可
};

int main()
{
    Function func;
    Bisection bis(0, 1, 0.00001, 100, func);
    std::cout << bis.solve() << std::endl;
    return 0;
};